import React, { Component } from 'react'
import './index.css'
export default class Baidu extends Component {
  render() {
    return (
      <div>
        <div id="l-map" ></div>
	      <div id="r-result"></div>
      </div>
    )
  }
  componentDidMount () {
    var map = new window.BMap.Map("l-map");
    map.centerAndZoom(new window.BMap.Point(116.404, 39.915), 11);
    var walking = new window.BMap.WalkingRoute(map, {renderOptions: {map: map, panel: "r-result", autoViewport: true}});
    walking.search("西单", "慈云寺");
  }
}
